﻿using System.ComponentModel.DataAnnotations;
using Microsoft.EntityFrameworkCore;

namespace WhaleAccount.Models;
/// <summary>
/// 收支类型
/// </summary>
[Comment("收支类型")]
public class Type
{
    [Key]
    [Comment("ID")]
    public int Id
    {
        get; set;
    }
    [Comment("名称")]
    public string Name
    {
        get; set;
    }
    [Comment("分类，0：支出，1：收入")]
    public int Category
    {
        get; set;
    }
    [Comment("图标")]
    public string Icon
    {
        get; set;
    }
    [Comment("排序")]
    public int Order
    {
        get; set;
    }
    [Comment("是否显示")]
    public bool Visible
    {
        get; set;
    }
    [Comment("扩展")]
    public string? Extend
    {
        get; set;
    }

    public Type()
    {

    }
    public Type(int id, string name, int category, string icon, int order, string? extend = null)
    {
        Id = id;
        Name = name;
        Category = category;
        Icon = icon;
        Order = order;
        Visible = true;
        Extend = extend;
    }
}
